package com.yida.service;

import com.yida.bean.*;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface serverblog {
	
	List<blog> selectblog(Integer page);
    Integer selectBlogsSumservice();
    blogger selectBloggerindexservice();
    
    List<blog> selectblogreservice();
    blog selectBlogservice(Integer id);
    List<blogtype> selectblogtypeservice();
    
    int[] selectdateallservice();
    
    List<log>  selectlogservice(Integer page);
    List<blog>  selectBlogtotype(Integer page,Integer id);
    List<Integer> selecttypeBlogsSumservice(Integer id);
    List<tag>    selecttagservice();
    List<blog>   selecttagBlogservice(Integer page,Integer id);
    Integer    selecttagBlogsumservice(Integer id);
    List<blog> searchservice(String keyword);
    Integer   updateblogsumservice(Integer id);
    
    //查询博客下的评论
    List<comment> listCommentByBlogId(Integer blogId);
    //查询留言的评论
    List<comment> leavecomment();
    
    //发布评论
    Integer saveConmment(comment comment, HttpSession session, Integer pd,Integer blogxqid,String email);
  
   
    
   //后端操作blogtype
    blogger selectBloggerservice(String username,String password);
    List<blogtype> selectBlogtypesservice(Integer page);
    Integer  selectTypeSumservice();
    Integer  deletetypeservice(Integer id);
    Integer updatetypeservice(blogtype type);
    Integer inserttypeservice(blogtype type);
    
   
    //后端操作blog
    List<blog> selectBlogadmin(Integer page, blog blog,Integer type);
    Integer selectBlogsumadmin(blog blog,Integer type); 
   
    boolean   insertblog(blog blog,Integer type,int[] tagIds);
   
    boolean delectblog(Integer id);
    
    boolean updateblog(blog blog,Integer type,int[] tagIds);
	
    
}
